<template>
	<view class="NFC">
		<uni-nav-bar color="#ffffff" background-color="#00aded" :status-bar="true" title="NFC" fixed="true" left-icon="left" />
		<view class="NFC_top">
			<button @click="listenNfc">监听NFC</button>
			<button @click="runNfc">运行NFC</button>
			<button @click="closeNfc">关闭NFC</button>
		</view>
	</view>
</template>

<script>
import nfc from '@/utils/nfc.js';
export default {
	data() {
		return {};
	},
	onLoad() {},
	onShow() {},
	onHide() {},
	onUnload() {},
	methods: {
		listenNfc() {
			console.log('监听');
			nfc.initNFC();
		},
		runNfc() {
			nfc.readNFC();
		},
		closeNfc() {
			nfc.closeNFC();
		}
	}
};
</script>

<style></style>
